# -*- coding: utf-8 -*
from enum import Enum, unique, auto


@unique
class PastTime(Enum):
    """过去时间枚举类"""
    NOW = ''
    THIRTY_SEC = '30s'
    ONE_MIN = '1m'
    THREE_MIN = '3m'
    FIVE_MIN = '5m'
    TEN_MIN = '10m'
    FIFTEEN_MIN = '15m'
    TWENTY_MIN = '20m'
    THIRTY_MIN = '30m'
    ONE_HOUR = '1h'


@unique
class DateTailPointer(Enum):
    """日期格式的尾指针"""
    SEC = -1
    MIN = -2
    HOUR = -3
    DAY = -4
    MONTH = -5


@unique
class DeviceName(Enum):
    """设备名称"""
    CPU = auto()
    DISK = auto()
    MEM = auto()
    NET = auto()
    SUMMARY = auto()


@unique
class SystemType(Enum):
    """系统调优的种类"""
    VM = "vm"
    KERNEL = "kernel"
    FS = "fs"
    NET = "net"


@unique
class TuningType(Enum):
    """调参的类型"""
    SYSTEM = auto()
    SOFTWARE = auto()


@unique
class TuningAction(Enum):
    """调参时的行为选择"""
    INCREASE = -1
    UNCHANGED = 0
    DECREASE = 1
